package com.aspose.cells;

public class MultipleFilterCollection extends CollectionBase {
   private boolean c;
   String b;

   void a(int var1, int var2, int var3, int var4, int var5, int var6, int var7) {
      for(int var8 = 0; var8 < this.getCount(); ++var8) {
         Object var9 = this.get(var8);
         if (var9 instanceof DateTimeGroupItem) {
            DateTimeGroupItem var10 = (DateTimeGroupItem)var9;
            if (var10.getDateTimeGroupingType() == var1) {
               switch(var1) {
               case 0:
                  if (var10.getYear() == var2 && var10.getMonth() == var3 && var10.getDay() == var4) {
                     this.a.remove(var8);
                     return;
                  }
                  break;
               case 1:
                  if (var10.getYear() == var2 && var10.getMonth() == var3 && var10.getDay() == var4 && var10.getHour() == var5) {
                     this.a.remove(var8);
                     return;
                  }
                  break;
               case 2:
                  if (var10.getYear() == var2 && var10.getMonth() == var3 && var10.getDay() == var4 && var10.getHour() == var5 && var10.getMinute() == var6) {
                     this.a.remove(var8);
                     return;
                  }
                  break;
               case 3:
                  if (var10.getYear() == var2 && var10.getMonth() == var3) {
                     this.a.remove(var8);
                     return;
                  }
                  break;
               case 4:
                  if (var10.getYear() == var2 && var10.getMonth() == var3 && var10.getDay() == var4 && var10.getHour() == var5 && var10.getMinute() == var6 && var10.getSecond() == var7) {
                     this.a.remove(var8);
                     return;
                  }
                  break;
               case 5:
                  if (var10.getYear() == var2) {
                     this.a.remove(var8);
                     return;
                  }
               }
            }
         }
      }

   }

   void a(String var1) {
      if (var1 == null) {
         this.c = false;
      } else {
         for(int var2 = 0; var2 < this.getCount(); ++var2) {
            Object var3 = this.get(var2);
            if (var3 instanceof String && com.aspose.cells.b.a.zv.b((String)var3, var1)) {
               this.a.remove(var2);
               return;
            }
         }

      }
   }

   void a(MultipleFilterCollection var1) {
      this.c = var1.c;

      for(int var2 = 0; var2 < var1.getCount(); ++var2) {
         Object var3 = var1.get(var2);
         if (var3 instanceof DateTimeGroupItem) {
            DateTimeGroupItem var4 = (DateTimeGroupItem)var3;
            DateTimeGroupItem var5 = new DateTimeGroupItem();
            var5.a(var4);
            com.aspose.cells.b.a.a.ze.a(this.a, (Object)var5);
         } else {
            com.aspose.cells.b.a.a.ze.a(this.a, var3);
         }
      }

   }

   public boolean getMatchBlank() {
      return this.c;
   }

   public void setMatchBlank(boolean value) {
      this.c = value;
   }

   public Object get(int index) {
      return this.a.get(index);
   }

   void b(String var1) {
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var1);
   }

   void a(DateTimeGroupItem var1) {
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var1);
   }

   boolean a(Cell var1) {
      if (!this.getMatchBlank() || var1 != null && var1.getType() != 3) {
         if (var1 != null && var1.getType() != 3) {
            for(int var2 = 0; var2 < this.getCount(); ++var2) {
               Object var3 = this.get(var2);
               if (var3 instanceof DateTimeGroupItem) {
                  if (((DateTimeGroupItem)var3).a(var1)) {
                     return true;
                  }
               } else if (com.aspose.cells.b.a.zr.a(var3).equals(var1.j())) {
                  return true;
               }
            }

            return false;
         } else {
            return false;
         }
      } else {
         return true;
      }
   }

   boolean a(Object var1) {
      if (this.getMatchBlank() && var1 == null) {
         return true;
      } else if (var1 == null) {
         return false;
      } else {
         for(int var2 = 0; var2 < this.getCount(); ++var2) {
            Object var3 = this.get(var2);
            if (var3 instanceof DateTimeGroupItem) {
               if (((DateTimeGroupItem)var3).a(var1)) {
                  return true;
               }
            } else {
               if (com.aspose.cells.b.a.zr.a(var3).equals(com.aspose.cells.b.a.zr.a(var1))) {
                  return true;
               }

               if (var1 instanceof Boolean) {
                  String var4 = com.aspose.cells.b.a.zr.a(var3).toUpperCase();
                  if ((Boolean)var1) {
                     if (var4.equals("TRUE")) {
                        return true;
                     }
                  } else if (var4.equals("FALSE")) {
                     return true;
                  }
               }
            }
         }

         return false;
      }
   }
}
